package mysql

import "gorm.io/gorm"

type Product struct {
	gorm.Model
	Name   string  `gorm:"type:varchar(20);not null;index:ip_idx commit:'商品名称'"`
	Price  float64 `gorm:"type:decimal(10,2);not null;index:ip_idx commit:'商品价格'"`
	Number int     `gorm:"type:int(10);not null;index:ip_idx commit:'商品数量'"`
	UserId int     `gorm:"type:int(10);not null;index:ip_idx commit:'用户ID'"`
	Title  string  `gorm:"type:varchar(20);not null;index:ip_idx commit:'商品标题'"`
}
